package com.hanliukui.ai.langchain4j.assistant.general;

import com.hanliukui.ai.langchain4j.assistant.translate.TranslateAssistant;
import com.hanliukui.ai.langchain4j.assistant.xiaozhi.XiaoziChatAssistant;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;


@RestController
@RequestMapping("/ai-assistant")
public class AssistantController {

    @Resource
    private GeneralAssistant generalAssistant;

    @Resource
    private TranslateAssistant translateAssistant;

    @Resource
    private XiaoziChatAssistant xiaoziChatAssistant;

    @GetMapping("/chat")
    public String chat(String memoryId, String question) {
        return generalAssistant.chat(memoryId, question, new Date());
    }
}
